<form action="${ctx}/moduleinfo/menuAuthority" method="post" enctype="multipart/form-data" id="authorityForm" style="height: 460px;overflow: auto;padding:0 20px;"> 
	<input type="hidden" name="companyId" value="${companyId!}" />
	
	<#list roleInfoList as roleInfo>
		<input type="hidden" name="roleId" value="${roleInfo.roleId}" />
		<!-- 角色名称 -->
		<h4 style="padding:15px 0; border-bottom:1px solid #e5e5e5;margin-top:0;">${roleInfo.roleName}</h4>
		
		<!-- 角色拥有的菜单权限 -->
		<#list firstLevelMenuList as menu>
			<div class="form-group form-inline row">
				<div class="col-sm-12" style="padding-left: 140px;min-height:25px;">
					<!-- 一级菜单名称 -->
					<#if authorityMap["${roleInfo.roleId}"]?seq_contains(menu.moduleId)>
						<label style="position:absolute;left:20px;top:0;"><input type="checkbox" class="minimal" name="moduleId_${roleInfo.roleId}" value="${menu.moduleId}" checked />&nbsp;&nbsp;${menu.moduleName}：</label>
					<#else>
						<label style="position:absolute;left:20px;top:0;"><input type="checkbox" class="minimal" name="moduleId_${roleInfo.roleId}" value="${menu.moduleId}" />&nbsp;&nbsp;${menu.moduleName}：</label>
					</#if>
					
					<!-- 二级级菜单名称 -->
					<#if secondLevelMenuMap["${menu.moduleId}"] ??>
						<#list secondLevelMenuMap["${menu.moduleId}"] as childMenu>
							<#if authorityMap["${roleInfo.roleId}"]?seq_contains(childMenu.moduleId)>
								<label style="font-weight:normal;"><input type="checkbox" class="minimal" name="moduleId_${roleInfo.roleId}" value="${childMenu.moduleId}" checked />&nbsp;&nbsp;${childMenu.moduleName}</label>
							<#else>
								<label style="font-weight:normal;"><input type="checkbox" class="minimal" name="moduleId_${roleInfo.roleId}" value="${childMenu.moduleId}" />&nbsp;&nbsp;${childMenu.moduleName}</label>
							</#if>
						</#list>
					</#if>
				</div>
			</div>
		</#list>
	</#list>
</form>

<script type="text/javascript">
  $(function () {
	  $('input[type="checkbox"].minimal').iCheck({
	      checkboxClass: 'icheckbox_minimal-blue'
      });
  });
</script>